set Volume
Sets the master audio volume for the application.
This method adjusts the overall volume level for audio playback originating from this application. The specified level is an integer percentage, typically ranging from 0 (mute) to 100 (maximum volume). Values outside this range may be clamped to the nearest valid value (e.g., negative values treated as 0, values above 100 treated as 100).
Note: While this sets the master application volume, individual content zones or specific media elements within the application might have their own relative volume settings. The final audible volume for a piece of content would be a combination of this master volume and any zone-specific adjustments.
Behavior on devices with fixed-volume outputs (e.g., HDMI connected to a TV that controls its own volume) may vary. On such devices, this method might have no audible effect or might control an internal software gain. Refer to Android's guidance on changes in audio output handling changes in audio output.
Parameters
The desired master volume level, as an integer percentage from 0 (mute) to 100 (maximum).
See also
Android Developer Guide: Controlling stream volume programmatically
For adjusting screen brightness.